import http from './../interface.js'

// GET 会员中心 /api/doctors.doctors/index
export const position = (data) => {
	return http.request({
		url: '/doctors.doctors/index',
		method: 'GET',
		data,
	})
}

// GET 账号密码 /api/doctors.doctors/login
export const login = (data) => {
	return http.request({
		url: '/doctors.doctors/login',
		method: 'GET',
		data,
	})
}

// GET 手机验证码登录 /api/doctors.doctors/mobilelogin
export const mobilelogin = (data) => {
	return http.request({
		url: '/doctors.doctors/mobilelogin',
		method: 'GET',
		data,
	})
}

// GET 退出登录 /api/doctors.doctors/logout
export const logout = (data) => {
	return http.request({
		url: '/doctors.doctors/logout',
		method: 'GET',
		data,
	})
}

// GET 第三方登录 /api/doctors.doctors/third
export const third = (data) => {
	return http.request({
		url: '/doctors.doctors/third',
		method: 'GET',
		data,
	})
}

// POST 医生身份认证 /api/doctors.ident/certification
export const certification = (data) => {
	return http.request({
		url: '/doctors.ident/certification',
		method: 'POST',
		data,
	})
}

// GET 绑定手机号码 /api/doctors.ident/bindmobile
export const bindmobile = (data) => {
	return http.request({
		url: '/doctors.ident/bindmobile',
		method: 'GET',
		data,
	})
}
// GET 接单状态列表 /api/doctors.doctors/statuslist
export const statuslist = (data) => {
	return http.request({
		url: '/doctors.doctors/statuslist',
		method: 'GET',
		data,
	})
}
// POST 接单状态设置 /api/doctors.doctors/setStatus
export const setStatus = (data) => {
	return http.request({
		url: '/doctors.doctors/setStatus',
		method: 'POST',
		data,
	})
}

// GET 订单列表 /api/doctors.advisoryorders/orderslist
export const orderslist = (data) => {
	return http.request({
		url: '/doctors.advisoryorders/orderslist',
		method: 'GET',
		data,
	})
}
// GET 订单详情 /api/doctors.advisoryorders/detail
export const detail = (data) => {
	return http.request({
		url: '/doctors.advisoryorders/detail',
		method: 'GET',
		data,
	})
}
// POST 接受订单 /api/doctors.advisoryorders/accept

export const accept = (data) => {
	return http.request({
		url: '/doctors.advisoryorders/accept',
		method: 'POST',
		data,
	})
}
// POST 取消订单 /api/doctors.advisoryorders/cancel
export const cancel = (data) => {
	return http.request({
		url: '/doctors.advisoryorders/cancel',
		method: 'POST',
		data,
	})
}
// GET 近期预约表 /api/doctors.doctors/appointmentlist

export const appointmentlist = (data) => {
	
	http.interceptor.request = (config) => {
		config.header = {
			"token": uni.getStorageSync('userInfo').token
		}
	}
	return http.request({
		url: '/doctors.doctors/appointmentlist',
		method: 'GET',
		data,
	})
}

// GET 文档列表 /api/doctors.manual/listcontent
export const listcontent = (data) => {
	return http.request({
		url: '/doctors.manual/listcontent',
		method: 'GET',
		data,
	})
}

// GET 工作安排-列表 /api/doctors.doctors/rosterlist
export const rosterlist = (data) => {
	return http.request({
		url: '/doctors.doctors/rosterlist',
		method: 'GET',
		data,
	})
}
// POST 工作安排-设置 /api/doctors.doctors/setroster
export const setroster = (data) => {
	return http.request({
		url: '/doctors.doctors/setroster',
		method: 'POST',
		data,
	})
}

// GET 医生服务列表 /api/doctors.doctors/goods
export const goods = (data) => {
	return http.request({
		url: '/doctors.doctors/goods',
		method: 'GET',
		data,
	})
}
// POST 医生添加服务 /api/doctors.doctors/addgoods
export const addgoods = (data) => {
	return http.request({
		url: '/doctors.doctors/addgoods',
		method: 'POST',
		data,
	})
}

// GET 医生删除服务 /api/doctors.doctors/delgoods
export const delgoods = (data) => {
	return http.request({
		url: '/doctors.doctors/delgoods',
		method: 'GET',
		data,
	})
}

// GET 服务列表 /api/doctors.doctors/goodslist
export const goodslist = (data) => {
	return http.request({
		url: '/doctors.doctors/goodslist',
		method: 'GET',
		data,
	})
}

// GET 资质证件 /api/doctors.doctors/working
export const working = (data) => {
	return http.request({
		url: '/doctors.doctors/working',
		method: 'GET',
		data,
	})
}

// POST 基础资料,查询使用get,修改使用post /api/doctors.doctors/detail
export const detailG = (data) => {
	return http.request({
		url: '/doctors.doctors/detail',
		method: 'GET',
		data,
	})
}
export const detailP = (data) => {
	return http.request({
		url: '/doctors.doctors/detail',
		method: 'POST',
		data,
	})
}

// POST 绑定微信,获取是get方式,绑定是post方式 /api/doctors.doctors/bingwechat
export const bingwechatG = (data) => {
	return http.request({
		url: '/doctors.doctors/bingwechat',
		method: 'GET',
		data,
	})
}
export const bingwechatP = (data) => {
	return http.request({
		url: '/doctors.doctors/bingwechat',
		method: 'POST',
		data,
	})
}
// GET 发送验证码 /api/sms/send
export const send = (data) => {
	return http.request({
		url: '/sms/send',
		method: 'GET',
		data,
	})
}

/**
 * 
 * 医生客户端 会员中心   医生端接口 会员中心
 * 
 */

export default {
	position,			//会员中心
	login,				//账号密码
	mobilelogin,		//手机验证码登录
	logout,				//退出登录
	third,				//第三方登录
	certification,		//医生身份认证
	bindmobile,			//绑定手机号码
	statuslist,			//接单状态列表
	setStatus,			//接单状态设置
	orderslist,			//订单列表
	detail,				//订单详情
	accept,				//接受订单
	cancel,				//取消订单
	appointmentlist,	//近期预约表
	listcontent,		//文档列表
	rosterlist,			//工作安排-列表
	setroster,			//工作安排-设置
	goodslist,			//服务列表
	goods,				//医生服务列表
	addgoods,			//医生添加服务
	delgoods,			//医生删除服务
	working,			//资质证件
	detailG,			//医生基础资料
	detailP,			//POST基础资料
	bingwechatG,		//获取绑定微信GET
	bingwechatP,		//绑定微信POST
	send,				//发送验证码
}
